package com.huibei.wateradmin.authority.message;


import com.huibei.wateradmin.authority.domain.Role;

/**
 * Created by wanglinlin on 2016/7/17.
 */
public class ClientRoleInfo {
    private Long id;
    private String name;
    private String description;

    public ClientRoleInfo(Long id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public ClientRoleInfo() {
    }

    public ClientRoleInfo(Role role) {
        this.id = role.getId();
        this.name = role.getName();
        this.description = role.getDescription();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static ClientRoleInfo converToClient(Role role) {
        if (role == null) {
            role = new Role();
        }
        return new ClientRoleInfo(role);
    }
}
